Skip to content

Instantly share code, notes, and snippets.

Set the GPU Device to vGPU Mode Using the vSphere Host Graphics Setting

A GPU card can be configured in one of two modes: vSGA (shared virtual graphics) and vGPU. The NVIDIA card should be configured with vGPU mode. This is specifically for use of the GPU in compute workloads, such as in machine learning or high performance computing applications. To enable vGPU mode on the ESXi host, use the command line to execute this command:

esxcli graphics host set --default-type SharedPassthru

Check the Host Graphics Settings

@wpmudev-sls
wpmudev-sls / forminator-custom-submission-number-for-custom-form.php
Last active May 4, 2023 00:28
[Forminator] - Custom submission id as order number
<?php
/**
* Plugin Name: [Forminator] - Custom submission id as order number
* Description: [Forminator] - Custom submission id as order number
* Jira: SLS-224
* Author: Thobk @ WPMUDEV
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
@benpoorker
benpoorker / gist:39f5a9acbbb2882778ace0ef93cabb4b
Created April 10, 2024 20:12
Fix Laravel Valet favicon 404
https://github.com/laravel/valet/issues/375#issuecomment-629801919
Nginx is looking for a favicon.ico file at the root level.
Instead, for Laravel projects, it should look in the public folder.
Just add /public on the files paths inside your config file, and run valet restart:
location = /public/favicon.ico { access_log off; log_not_found off; }
location = /public/robots.txt { access_log off; log_not_found off; }
@GentleCP
GentleCP / WXBizMsgCrypt3.py
Created July 15, 2021 07:53
corpwechatbot-web
#!/usr/bin/env python
# -*- encoding:utf-8 -*-
""" 对企业微信发送给企业后台的消息加解密示例代码.
@copyright: Copyright (c) 1998-2014 Tencent Inc.
"""
# ------------------------------------------------------------------------
import logging
import base64
@TheMuellenator
TheMuellenator / main.py
Last active June 2, 2024 01:01 — forked from angelabauer/main.py
Solution for main.py for the Flight Club
import sheety
print("Welcome to Angela's Flight Club.\n \
We find the best flight deals and email them to you.")
first_name = input("What is your first name? ").title()
last_name = input("What is your last name? ").title()
email1 = "email1"
email2 = "email2"
@JBlond
JBlond / bash-colors.md
Last active June 2, 2024 01:00 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@rifayetuxbd
rifayetuxbd / create_configure_angular_standalone_with_firebase_emualtor.md
Last active June 2, 2024 00:44
Create and configure angular standalone app with firebase emulators

Create and configure angular standalone app with firebase emulators

Create Angular Standalone App

Create angular standalone app by using command npx @angular/cli@latest new <APP_NAME> --standalone --routing --style=scss

Generate and Update enviroment files

  • Generate environment file for production and devlopment by using command ng g environments
    • It will generate two file environment.ts and environment.development.ts under src/environments/
    • It will update amgular.json file for replacing environment.ts with environment.development.ts for dev version
  • Update environments to below
@kerimdzhanov
kerimdzhanov / random.js
Last active June 2, 2024 00:43
JavaScript: get a random number from a specific range
/**
* Get a random floating point number between `min` and `max`.
*
* @param {number} min - min number
* @param {number} max - max number
* @return {number} a random floating point number
*/
function getRandomFloat(min, max) {
return Math.random() * (max - min) + min;
}
@TheMuellenator
TheMuellenator / main.py
Last active June 2, 2024 00:42 — forked from angelabauer/main.py
Day 38 Step 5 L335 - Solution
#No Authentication
sheet_response = requests.post(sheet_endpoint, json=sheet_inputs)
#Basic Authentication
sheet_response = requests.post(
sheet_endpoint,
json=sheet_inputs,
auth=(
YOUR USERNAME,
YOUR PASSWORD,
Команды в Git Bash консоли
clear — Очистить консоль
Навигация
pwd — Показать текущий каталог
ls - Показать файлы в данной папке, кроме скрытых
ls -f — Показать файлы в данной папке, включая и скрытые
cd c:/ — Перейти в конкретный каталог
cd - — Вернуться назад
cd .. — Выйти на 1 уровень вверх